package main

import "fmt"

type Animal struct {
	Name string
}

type Dog struct {
	*Animal
}

func (a Animal) Call() string {
	return "动物的叫声..."
}

func (a Animal) FavorFood() string {
	return "爱吃的食物..."
}

func (a Animal) GetName() string {
	return a.Name
}

func main() {
	dog := Dog{}
	dog.Name = "中华田园犬"
	fmt.Println(dog.GetName())
	fmt.Println(dog.Call())
	fmt.Println(dog.FavorFood())
}
